//
//  BottomSheet.h
//  ZZmetro
//
//  Created by 一介布衣 on 2020/6/17.
//  Copyright © 2020 一介布衣. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

typedef void (^BottomSheetCancelBlock)(void);
typedef void (^BottomSheetConfirmBlock)(void);
//typedef void (^BottomSheetConfirmBlock)(NSArray<NSString *> *strings, NSArray<NSNumber *> *indexs);

/**
 * BottomesheetBuilder 属性设置
 */
@interface BottomSheetBuilder : NSObject
//确认按钮的文字，默认为“确认”
@property (nonatomic, copy, nullable) NSString *confirmText;
//取消按钮的文字，默认为“取消”
@property (nonatomic, copy, nullable) NSString *cancelText;
//确认文字的颜色，默认是蓝色
@property (nonatomic, strong, nullable) UIColor *confirmTextColor;
//取消文字的颜色，默认为蓝色
@property (nonatomic, strong, nullable) UIColor *cancelTextColor;
//选择器的背景颜色，默认为白色
@property (nonatomic, strong, nullable) UIColor *pickerColor;
//选择器的文字颜色，默认为黑色
@property (nonatomic, strong, nullable) UIColor *sheetTextColor;
//标题字符串
@property (nonatomic, copy, nullable) NSString *titleText;
//标题颜色
@property (nonatomic, strong, nullable) UIColor *titleTextColor;
//整个pickerView的高度，默认为248，包括44的按钮栏
@property (nonatomic, assign) CGFloat sheetHeight;
//是否隐藏title
@property (nonatomic, assign) BOOL hideTitle;
@end

@interface BottomSheet : UIViewController

@property (nonatomic, strong) BottomSheetBuilder* builder;

+(BottomSheetBuilder*) sheetBuilder;

-(void) setBootSheetContentView:(UIView *) content;

-(void) setTitle:(NSString *) title withColor:(int) color;

-(void) setItemLeft:(NSString *) leftTitle right:(NSString *) rightTitle;

-(void) show:(UIViewController*) controller;

-(void) show:(UIViewController*) controller confirm:(BottomSheetConfirmBlock) confirm cancel:(BottomSheetCancelBlock) cancel;

- (void)dissView;

@end

NS_ASSUME_NONNULL_END
